<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Demo</title>
  <link rel="stylesheet" href="dist/idangerous.swiper.css">
  <style>
/* Demo Styles */
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
.swiper-container {
  width: 660px;
  height: 250px;
  color: red;
  text-align: center;
}
.swiper-slide .title {
  font-style: italic;
  font-size: 42px;
  margin-top: 80px;
  margin-bottom: 0;
  line-height: 45px;
}
.pagination {
  position: absolute;
  z-index: 20;
  left: 10px;
  bottom: 10px;
}
.swiper-pagination-switch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 8px;
  background: #222;
  margin-right: 5px;
  opacity: 0.8;
  border: 1px solid #fff;
  cursor: pointer;
}
.swiper-visible-switch {
  background: #aaa;
}
.swiper-active-switch {
  background: #fff;
}
/*切换按钮*/
#swiper01 .swiper-button-next {
  background: #f00;
  position: absolute;
  left: 0;
  top: 10px;
  width: 20px;
  height: 30px;
}
#swiper01 .swiper-button-prev {
  background: #f00;
  position: absolute;
  right: 0;
  top: 10px;
  width: 20px;
  height: 30px;
}
/*处理特殊高亮*/
#swiper01 .swiper-slide-visible{

}
#swiper01 .swiper-slide-active+div{
  color:#000;
}
  </style>
</head>
<body>
  <div class="swiper-container" id="swiper01">
    <div class="swiper-wrapper">
      <div class="swiper-slide">
        <div class="title">Slide 1</div>
      </div>
      <div class="swiper-slide">
        <div class="title">Slide 2</div>
      </div>
      <div class="swiper-slide">
        <div class="title">Slide 3</div>
      </div>
      <div class="swiper-slide">
        <div class="title">Slide 4</div>
      </div>
      <div class="swiper-slide">
        <div class="title">Slide 5</div>
      </div>
      <div class="swiper-slide">
        <div class="title">Slide 6</div>
      </div>
      <div class="swiper-slide">
        <div class="title">Slide 7</div>
      </div>
      <div class="swiper-slide">
        <div class="title">Slide 8</div>
      </div>
    </div>
    <div class="pagination"></div>

     <div class="swiper-button-next"></div>
    <div class="swiper-button-prev"></div>

  </div>
  <script src="dist/jquery-1.10.1.min.js"></script>
  <script src="dist/idangerous.swiper.min.js"></script>
  <script>
  var mySwiper = new Swiper('.swiper-container',{
    pagination: '.pagination',
    paginationClickable: true,
    slidesPerView: 3,
    loop: true
  })

  $('#swiper01 .swiper-button-next').on('click', function(e){
    e.preventDefault()
    mySwiper.swipePrev()
  })
  $('#swiper01 .swiper-button-prev').on('click', function(e){
    e.preventDefault()
    mySwiper.swipeNext()
  })
  </script>
</body>
</html>